<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Login Page</title>
    </h:head>
    <h:body>
        <f:view>
            <h:form>
                <p:growl id="growl" showDetail="true" sticky="true"/>
                <p:panel header="Login" style="margin: 0 auto; width: 25%">
                    <p:panelGrid columns="2" style="margin:2% auto">
                        <p:outputLabel for="usernameInput" value="Username"/>
                        <p:inputText id="usernameInput" value="#{loginGUI.username}" required="true" />
                        <p:outputLabel for="passwordInput" value="Password"/>
                        <p:password id="passwordInput" value="#{loginGUI.password}" required="true" />
                        <p:commandButton value="Login" action="#{loginGUI.login()}" update="growl"/>
                    </p:panelGrid>
                    <h:link outcome="registration" value="Register" style="margin-left: 80%"/>
                </p:panel>
            </h:form>
        </f:view>
    </h:body>
</html>

